﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SzCourt.Logic.NBL.DBEntities;
using SzCourt.Logic.BLL;

namespace SzCourt.WebSite.manager
{
    public partial class dellian : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!AdminSession.SessionBox.CheckUserSession())
            {
                Response.Redirect("/manager/login.aspx");
            }
            if (!this.IsPostBack)
            {
                delinfo();
            }
        }


        private void delinfo()
        {
             string _ID = string.IsNullOrEmpty(Request.QueryString["id"]) ? "" : Request.QueryString["id"];

            pPreCaseInfo param = new pPreCaseInfo();
            param.PreCaseInfoID = int.Parse(_ID);
            PreCase bll = new PreCase();
            bool result = (bool)bll.DelPreCase(param);

            if (result)
            {
                this.spMessage.InnerHtml = "删除成功！";
            }
            else
            {
                this.spMessage.InnerHtml = "删除失败！";
            }
        }
    }
}